<template>
  <div>
    <my-component>
      <!-- 使用插槽 -->
      <template v-slot:slot="scope">
        <p>name: {{ scope.obj.name }}</p>
      </template>

      <!-- 使用插槽 简写 -->
      <template #slot2="scope">
        <p>age: {{ scope.obj.age }}</p>
      </template>
    </my-component>
  </div>
</template>

<script>
import MyComponent from './MyComponent.vue'

export default {
  components: {
    MyComponent
  }
}
</script>
